Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract cleanup #809

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Contract cleanup #809

merged 1 commit into from
Aug 8, 2024

Conversation

volovyks
Copy link
Collaborator

@volovyks volovyks commented Aug 8, 2024

No description provided.

@volovyks volovyks requested review from ChaoticTempest and ppca August 8, 2024 12:22
@@ -612,7 +603,7 @@ impl VersionedMpcContract {

// This function can be used to transfer the MPC network to a new contract.
#[private]
#[init(ignore_state)]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is less important since we plan to stick to 1 contract.
If we decide to move to another one - it should not have any state.

@@ -798,22 +790,6 @@ impl VersionedMpcContract {
}
}

#[private]
#[init(ignore_state)]
pub fn clean(keys: Vec<near_sdk::json_types::Base64VecU8>) -> Self {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed since we will not have any FAKs.

@@ -28,7 +28,6 @@ pub struct RunningContractState {
pub struct ResharingContractState {
pub old_epoch: u64,
pub old_participants: Participants,
// TODO: only store diff to save on storage
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think we should ever do this. The logic is not executed often and I prefer a simpler design.

@volovyks volovyks merged commit eef0d1b into develop Aug 8, 2024
4 checks passed
@volovyks volovyks deleted the serhii/contract-cleanup branch August 8, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants